package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpWorkAddDTO;
import org.jsola.hr.dto.EmpWorkUpdateDTO;
import org.jsola.hr.query.EmpWorkQuery;
import org.jsola.hr.vo.EmpWorkListVO;
import org.jsola.hr.vo.EmpWorkVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工工作经历")
public interface IEmpWorkControllerAPI {

    /**
     * 新增员工工作经历
     * @param empWorkAddDTO 员工工作经历新增实体
     * @return 员工工作经历展示对象
     */
    @ApiOperation(value = "新增员工工作经历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkAddDTO", dataType = "EmpWorkAddDTO", value = "新增员工工作经历", paramType = "body")
    })
    Result<EmpWorkVO> save(EmpWorkAddDTO empWorkAddDTO);


    /**
     * 修改员工工作经历
     * @param empWorkUpdateDTO 员工工作经历
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工工作经历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkUpdateDTO", dataType = "EmpWorkUpdateDTO", value = "修改员工工作经历", paramType = "body")
    })
    Result<Integer> update(EmpWorkUpdateDTO empWorkUpdateDTO);




    /**
     * 删除单个员工工作经历，彻底删除
     * @param empWorkId 员工工作经历id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工工作经历，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkId", dataType = "String", value = "员工工作经历id", paramType = "path")
    })
    Result<Integer> delete(String empWorkId);


    /**
     * 批量删除员工工作经历，彻底删除
     * @param empWorkIds 员工工作经历id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工工作经历，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkIds", dataType = "String[]", value = "员工工作经历id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empWorkIds);


    /**
     * 根据员工工作经历id查询员工工作经历详情
     * @param empWorkId 员工工作经历id
     * @return 员工工作经历详情
     */
    @ApiOperation(value="根据员工工作经历id查询员工工作经历详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkId", dataType = "String", value = "员工工作经历id", paramType = "path")
    })
    Result<EmpWorkVO> findById(String empWorkId);


    /**
     * 查询员工工作经历
     * @param empWorkQuery 员工工作经历查询参数
     * @return page
     */
    @ApiOperation(value="查询员工工作经历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkQuery", dataType = "EmpWorkQuery", value = "员工工作经历查询参数", paramType = "query")
    })
    Result<List<EmpWorkListVO>> listAll(EmpWorkQuery empWorkQuery);


     /**
     * 分页查询员工工作经历
     * @param empWorkQuery 员工工作经历查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工工作经历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkQuery", dataType = "EmpWorkQuery", value = "员工工作经历查询参数", paramType = "query")
    })
    Result<Page<EmpWorkListVO>> page(EmpWorkQuery empWorkQuery);

    /**
     * 删除员工工作经历
     * @param empWorkId 员工工作经历id
     * @return 删除数量
     */
    @ApiOperation(value="删除员工工作经历")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empWorkId", dataType = "String", value = "员工工作经历id", paramType = "path")
    })
    Result<Integer> deleteEmpWork(String empWorkId);


}

